home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Tcl-Tk 8.0 / Pre-installed version / tcl8.0 / mac / tclMacResource.r < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-15  |  2.8 KB  |  91 lines  |  [TEXT/CWIE]

  1. /* 
  2.  * tclMacResource.r --
  3.  *
  4.  *    This file creates resources for use in a simple shell.
  5.  *    This is designed to be an example of using the Tcl libraries
  6.  *    statically in a Macintosh Application.  For an example of
  7.  *    of using the dynamic libraries look at tclMacApplication.r.
  8.  *
  9.  * Copyright (c) 1993-94 Lockheed Missle & Space Company
  10.  * Copyright (c) 1994-97 Sun Microsystems, Inc.
  11.  *
  12.  * See the file "license.terms" for information on usage and redistribution
  13.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  14.  *
  15.  * SCCS: @(#) tclMacResource.r 1.17 97/08/13 16:53:44
  16.  */
  17.  
  18. #include <Types.r>
  19. #include <SysTypes.r>
  20.  
  21. /*
  22.  * The folowing include and defines help construct
  23.  * the version string for Tcl.
  24.  */
  25.  
  26. #define RESOURCE_INCLUDED
  27. #include "tcl.h"
  28.  
  29. #if (TCL_RELEASE_LEVEL == 0)
  30. #   define RELEASE_LEVEL alpha
  31. #elif (TCL_RELEASE_LEVEL == 1)
  32. #   define RELEASE_LEVEL beta
  33. #elif (TCL_RELEASE_LEVEL == 2)
  34. #   define RELEASE_LEVEL final
  35. #endif
  36.  
  37. #if (TCL_RELEASE_LEVEL == 2)
  38. #   define MINOR_VERSION (TCL_MINOR_VERSION * 16) + TCL_RELEASE_SERIAL
  39. #else
  40. #   define MINOR_VERSION TCL_MINOR_VERSION * 16
  41. #endif
  42.  
  43. resource 'vers' (1) {
  44.     TCL_MAJOR_VERSION, MINOR_VERSION,
  45.     RELEASE_LEVEL, 0x00, verUS,
  46.     TCL_PATCH_LEVEL,
  47.     TCL_PATCH_LEVEL ", by Ray Johnson © Sun Microsystems"
  48. };
  49.  
  50. resource 'vers' (2) {
  51.     TCL_MAJOR_VERSION, MINOR_VERSION,
  52.     RELEASE_LEVEL, 0x00, verUS,
  53.     TCL_PATCH_LEVEL,
  54.     "Simple Tcl Shell " TCL_PATCH_LEVEL " © 1996"
  55. };
  56.  
  57.  
  58. /* 
  59.  * The mechanisim below loads Tcl source into the resource fork of the
  60.  * application.  The example below creates a TEXT resource named
  61.  * "Init" from the file "init.tcl".  This allows applications to use
  62.  * Tcl to define the behavior of the application without having to
  63.  * require some predetermined file structure - all needed Tcl "files"
  64.  * are located within the application.  To source a file for the
  65.  * resource fork the source command has been modified to support
  66.  * sourcing from resources.  In the below case "source -rsrc {Init}"
  67.  * will load the TEXT resource named "Init".
  68.  */
  69. read 'TEXT' (0, "Init", purgeable, preload) "::library:init.tcl";
  70. read 'TEXT' (1, "History", purgeable,preload) "::library:history.tcl";
  71.  
  72. /*
  73.  * The following resource is used when creating the 'env' variable in
  74.  * the Macintosh environment.  The creation mechanisim looks for the
  75.  * 'STR#' resource named "Tcl Environment Variables" rather than a
  76.  * specific resource number.  (In other words, feel free to change the
  77.  * resource id if it conflicts with your application.)  Each string in
  78.  * the resource must be of the form "KEYWORD=SOME STRING".  See Tcl
  79.  * documentation for futher information about the env variable.
  80.  *
  81.  * A good example of something you may want to set is: "TCL_LIBRARY=My
  82.  * disk:etc."
  83.  */
  84.  
  85. resource 'STR#' (128, "Tcl Environment Variables") {
  86.     {    "SCHEDULE_NAME=Agent Controller Schedule",
  87.         "SCHEDULE_PATH=Lozoya:System Folder:Tcl Lib:Tcl-Scheduler"
  88.     };
  89. };
  90.  
  91.